// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::CompanyService].
#[async_trait::async_trait]
pub trait CompanyService: std::fmt::Debug + Send + Sync {
    async fn create_company(
        &self,
        req: crate::model::CreateCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>>;

    async fn get_company(
        &self,
        req: crate::model::GetCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>>;

    async fn update_company(
        &self,
        req: crate::model::UpdateCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>>;

    async fn delete_company(
        &self,
        req: crate::model::DeleteCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_companies(
        &self,
        req: crate::model::ListCompaniesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCompaniesResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;
}

/// All implementations of [super::CompanyService] also implement [CompanyService].
#[async_trait::async_trait]
impl<T: super::CompanyService> CompanyService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_company(
        &self,
        req: crate::model::CreateCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>> {
        T::create_company(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_company(
        &self,
        req: crate::model::GetCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>> {
        T::get_company(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_company(
        &self,
        req: crate::model::UpdateCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Company>> {
        T::update_company(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_company(
        &self,
        req: crate::model::DeleteCompanyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_company(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_companies(
        &self,
        req: crate::model::ListCompaniesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCompaniesResponse>> {
        T::list_companies(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::Completion].
#[async_trait::async_trait]
pub trait Completion: std::fmt::Debug + Send + Sync {
    async fn complete_query(
        &self,
        req: crate::model::CompleteQueryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CompleteQueryResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;
}

/// All implementations of [super::Completion] also implement [Completion].
#[async_trait::async_trait]
impl<T: super::Completion> Completion for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn complete_query(
        &self,
        req: crate::model::CompleteQueryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CompleteQueryResponse>> {
        T::complete_query(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::EventService].
#[async_trait::async_trait]
pub trait EventService: std::fmt::Debug + Send + Sync {
    async fn create_client_event(
        &self,
        req: crate::model::CreateClientEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ClientEvent>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;
}

/// All implementations of [super::EventService] also implement [EventService].
#[async_trait::async_trait]
impl<T: super::EventService> EventService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_client_event(
        &self,
        req: crate::model::CreateClientEventRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ClientEvent>> {
        T::create_client_event(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::JobService].
#[async_trait::async_trait]
pub trait JobService: std::fmt::Debug + Send + Sync {
    async fn create_job(
        &self,
        req: crate::model::CreateJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>>;

    async fn batch_create_jobs(
        &self,
        req: crate::model::BatchCreateJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn get_job(
        &self,
        req: crate::model::GetJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>>;

    async fn update_job(
        &self,
        req: crate::model::UpdateJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>>;

    async fn batch_update_jobs(
        &self,
        req: crate::model::BatchUpdateJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_job(
        &self,
        req: crate::model::DeleteJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn batch_delete_jobs(
        &self,
        req: crate::model::BatchDeleteJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_jobs(
        &self,
        req: crate::model::ListJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListJobsResponse>>;

    async fn search_jobs(
        &self,
        req: crate::model::SearchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchJobsResponse>>;

    async fn search_jobs_for_alert(
        &self,
        req: crate::model::SearchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchJobsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::JobService] also implement [JobService].
#[async_trait::async_trait]
impl<T: super::JobService> JobService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_job(
        &self,
        req: crate::model::CreateJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>> {
        T::create_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_create_jobs(
        &self,
        req: crate::model::BatchCreateJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::batch_create_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_job(
        &self,
        req: crate::model::GetJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>> {
        T::get_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_job(
        &self,
        req: crate::model::UpdateJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Job>> {
        T::update_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_update_jobs(
        &self,
        req: crate::model::BatchUpdateJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::batch_update_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_job(
        &self,
        req: crate::model::DeleteJobRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_delete_jobs(
        &self,
        req: crate::model::BatchDeleteJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::batch_delete_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_jobs(
        &self,
        req: crate::model::ListJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListJobsResponse>> {
        T::list_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn search_jobs(
        &self,
        req: crate::model::SearchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchJobsResponse>> {
        T::search_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn search_jobs_for_alert(
        &self,
        req: crate::model::SearchJobsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchJobsResponse>> {
        T::search_jobs_for_alert(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}

/// A dyn-compatible, crate-private version of [super::TenantService].
#[async_trait::async_trait]
pub trait TenantService: std::fmt::Debug + Send + Sync {
    async fn create_tenant(
        &self,
        req: crate::model::CreateTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>>;

    async fn get_tenant(
        &self,
        req: crate::model::GetTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>>;

    async fn update_tenant(
        &self,
        req: crate::model::UpdateTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>>;

    async fn delete_tenant(
        &self,
        req: crate::model::DeleteTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_tenants(
        &self,
        req: crate::model::ListTenantsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListTenantsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;
}

/// All implementations of [super::TenantService] also implement [TenantService].
#[async_trait::async_trait]
impl<T: super::TenantService> TenantService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_tenant(
        &self,
        req: crate::model::CreateTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>> {
        T::create_tenant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_tenant(
        &self,
        req: crate::model::GetTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>> {
        T::get_tenant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_tenant(
        &self,
        req: crate::model::UpdateTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Tenant>> {
        T::update_tenant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_tenant(
        &self,
        req: crate::model::DeleteTenantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_tenant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_tenants(
        &self,
        req: crate::model::ListTenantsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListTenantsResponse>> {
        T::list_tenants(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }
}
